package dslProgramGen;

/**
 * 全局变量表的一条记录类型
 */
public class GlobalVarTableRecord {
    public String id;
    public String type;
    public String dslExpr;
    /**
     * 如果表示新建数组类型，需要加上数组大小
     */
    public String arraySize;
    /**
     * 是否被之后的Put或PutA使用
     */
    public boolean isUsed;

    public GlobalVarTableRecord(String id, String type, String dslExpr, String arraySize, boolean isUsed) {
        this.id = id;
        this.type = type;
        this.dslExpr = dslExpr;
        this.arraySize = arraySize;
        this.isUsed = isUsed;
    }

    @Override
    public String toString() {
        return id + " " + type + " " + dslExpr + " " + arraySize;
    }
}
